﻿using Ledict.ConditionExtract.DAL;
using Ledict.ConditionExtract.Model;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ledict.ConditionExtract.BLL
{
    public class ExpressSourceDefaultSettingsBLL 
    {
        ExpressSourceDefaultSettingsDAL dsd = new ExpressSourceDefaultSettingsDAL();

        /// <summary>
        /// 获取来源默认配置数据根据节点类型
        /// </summary>
        /// <param name="ccId"></param>
        /// <returns></returns>
        public DataTable GetExpressSourceDefaultSettingsData(string nodeType,int level)
        {
            return dsd.GetExpressSourceDefaultSettingsData(nodeType,level);
        }

        /// <summary>
        /// 获取来源默认配置数据根据节点类型
        /// </summary>
        /// <param name="ccId"></param>
        /// <returns></returns>
        public DataTable GetExpressSourceDefaultSettingsData(string ccId)
        {
            return dsd.GetExpressSourceDefaultSettingsData(ccId);
        }

        /// <summary>
        /// 获取来源默认配置
        /// </summary>
        /// <returns></returns>
        public ArrayList GetExpressSource(string condition)
        {
            return dsd.GetExpressSource(condition);
        }

        /// <summary>
        /// 根据dsId删除来源默认配置数据
        /// </summary>
        /// <param name="dsId"></param>
        /// <returns></returns>
        public bool DeleteExpressSourceDefaultSettingsDataByDsId(string dsId)
        {
            return dsd.DeleteExpressSourceDefaultSettingsDataByDsId(dsId);
        }

        /// <summary>
        /// 判断是否存在来源默认配置项
        /// </summary>
        /// <param name="ss"></param>
        /// <returns></returns>
        public bool IsExistsData(SYS_Express_SourceDefaultSettings ss)
        {
            return dsd.IsExistsData(ss);
        }

        /// <summary>
        /// 插入来源默认配置
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool AddExpressSourceDefault(SYS_Express_SourceDefaultSettings model)
        {
            return dsd.AddExpressSourceDefault(model);
        }

        /// <summary>
        /// 获取共用信息单元
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        public DataTable GetpublicInformation(string condition)
        {
            return dsd.GetpublicInformation(condition);
        }

        /// <summary>
        /// 获取共用信息单元
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        public string ShowpublicInformation(string publicInfoID, string DS_ID)
        {
            return dsd.ShowpublicInformation(publicInfoID, DS_ID);

        }
    }
}
